package com.yogee.topseller.fragment;

import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.yogee.core.utils.AppManager;
import com.yogee.topseller.R;
import com.yogee.topseller.activity.PayActivity;
import com.yogee.topseller.activity.login.view.impl.RegisterLabelActivity;
import com.yogee.topseller.activity.login.view.impl.ResetPsActivity;


/**
 * Created by Administrator on 2016/9/16.
 */
public class TiyanFragment extends DialogFragment {

    private TextView tv1,tv2;

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        final Dialog mDetailDialog = new Dialog(getActivity(), R.style.dialog);
        mDetailDialog.setContentView(R.layout.pop_tiyan);
        mDetailDialog.setCancelable(false);
        TextView refresh_tv = (TextView) mDetailDialog.findViewById(R.id.refresh_tv);
        refresh_tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Intent intent = new Intent(getActivity(), RegisterLabelActivity.class);
//                intent.putExtra("userId", o.getUserId());
                startActivity(intent);
                mDetailDialog.dismiss();
                AppManager.finishAllActivity();

            }
        });

        TextView tv_return = (TextView) mDetailDialog.findViewById(R.id.tv_return);
        tv_return.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                mDetailDialog.dismiss();
                getActivity().finish();
            }
        });
        tv1 = (TextView) mDetailDialog.findViewById(R.id.tv1);
        tv2 = (TextView) mDetailDialog.findViewById(R.id.tv2);
//        getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
//        tv1.setText("恭喜您注册成功，赠送你"+getArguments().getString("day")+"天体验会员");
        tv2.setText("完成注册搜搜出单将自动增加"+getArguments().getString("day")+"天会员特权");
        return mDetailDialog;
    }


}
